#pragma once
#include <string>
#include <array>
#include "sqlite3.h"
#include <cmath>

class ChessDatabase {
public:
    struct ChessPiece {
        int num;
        double x;
        double y;
        std::string color;
        std::string type;
        std::array<double, 7> huMoments;
    };

    explicit ChessDatabase(const std::string& db_path);
    ~ChessDatabase();

    void addChessPiece(const ChessPiece& piece);
    void printAllChessPieces();
    std::string matchChessPiece(const ChessPiece& piece);

private:
    sqlite3* db;
    void create_table();
};